package navigate

import (
	"common"
	"common/zapx"
	"go.uber.org/zap"
	"models/dal/model"
	"models/dal/query"
	"time"
)

// GetNavigateList 获取导航列表
func GetNavigateList() (ret []*model.FaNavigate) {
	ctx, cancel := common.WithTimeoutContext(time.Second * 2)
	defer cancel()
	ret, err := query.Q.FaNavigate.WithContext(ctx).Order(query.Q.FaNavigate.Weigh.Desc()).Find()
	if err != nil {
		zapx.Logger.Error("[GetNavigateList]查询数据失败", zap.Error(err))
	}
	return
}
